package com.monolithiot.sso.service.impl;

import com.monolithiot.sso.common.entity.DeviceType;
import com.monolithiot.sso.dao.BaseMapper;
import com.monolithiot.sso.dao.mapper.DeviceTypeMapper;
import com.monolithiot.sso.service.DeviceTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 2018/12/22 Create by 郭文梁
 * DeviceTypeServiceImpl
 * 设备类型业务服务实现
 *
 * @author 郭文梁
 * @date 2018/12/22
 */
@Service
public class DeviceTypeServiceImpl extends BaseServiceImpl<DeviceType> implements DeviceTypeService {
    private final DeviceTypeMapper deviceTypeMapper;

    @Autowired
    public DeviceTypeServiceImpl(DeviceTypeMapper deviceTypeMapper) {
        this.deviceTypeMapper = deviceTypeMapper;
    }

    @Override
    BaseMapper<DeviceType> getMapper() {
        return deviceTypeMapper;
    }

    @Override
    public boolean exists(Integer id) {
        DeviceType query = new DeviceType();
        query.setId(id);
        return exists(query);
    }
}
